<%-- 
    Document   : login
    Created on : 2014/2/24, 上午 11:05:20
    Author     : M_I_C_hael
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>登入</title>
        <link rel=stylesheet type="text/css" href="style.css">
    </head>
    <script>
        function reloadimage() {
            document.getElementById('btn');
            document.getElementById('identity').src = 'identity?ts=' + new Date().getTime();
        }
    </script>
    <body>
        <form action="loginservlet" method="post">
            帳號：<input type="text" name="username" value="${param.username}"><br/>
            密碼：<input type="password" name="password" value="${param.password}"><br/>
            <img src="identity" id="identity" onclick="btn"/>
            <input type="button" value="換個圖片" onclick="reloadimage()" id="btn"><br/>
            驗證碼：<input type="text" name="identity" value="${param.identity}"/><br/>
            <input type="submit" />
        </form>
            
            <c:if test="${!empty error}">
                訊息: ${error}
            </c:if>
    </body>
</html>
